package com.simon.app.october.modules.sys.service.impl;

import com.simon.app.october.modules.sys.dao.SysUserRoleDao;
import com.simon.app.october.modules.sys.service.SysUserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Arrays;
import java.util.List;

@Service
public class SysUserRoleServiceImpl implements SysUserRoleService {

    @Autowired
    private SysUserRoleDao userRoleDao;

    @Override
    public List<Long> getRoleIdList(Long userId) {
        return userRoleDao.getRoleIdList(userId);
    }

    @Override
    public void deleteByRoleIds(Long[] roleIds) {
        userRoleDao.deleteByRoleIds(Arrays.asList(roleIds));
    }
}
